---
import { Code as CCode } from "@astrojs/starlight/components"

type CodeProps = Parameters<typeof CCode>[number]

interface Props extends CodeProps {}

const { code, lang, frame = "none", title, class: className, ...restProps } = Astro.props
---

<CCode
  {lang}
  {title}
  {frame}
  code={code.trim()}
  class:list={[className, "text-sm sm:text-base"]}
  {...restProps}
/>

<style lang="postcss">
</style>
